23 #define foreach(x, v) for (typeof (v).begin() x=(v).begin(); x !=(v).end(); ++x)
24 #define For(i, a, b) for (int i=(a); i<(b); ++i)
25 #define D(x) cout << #x " is " << x << endl
27 int count(int x
, int digit
) {
28 int power
= 1, ans
= 0;
29 int left
= x
, right
= 0;
31 int current
= left
% 10;
34 if (current
== digit
) {
36 } else if (current
> digit
) {
43 ans
-= (power
- 1) / 9;
50 while (cin
>> a
>> b
) {
51 if (a
== 0 and b
== 0) break;
54 for (int d
= 0; d
<= 9; ++d
) {
56 if (a
- 1 > 0) ans
[d
] -= count(a
- 1, d
);
59 for (int i
= 0; i
<= 9; ++i
) {
60 if (i
> 0) printf(" ");